<!DOCTYPE html>
<html lang="sr">
<head>
    <?php echo $this->Html->charset(); ?>
    <title>
        <?= empty($title_for_layout) ? '' : $title_for_layout . ' &middot '; ?>Končar Auto &middot; Registracija i osiguranje vozila
    </title>
    <?php
        echo $this->Html->meta('icon');

        echo $this->Html->css('jquery-ui-1.10.3.custom.min');
        echo $this->Html->css('admin');
        
        echo $this->Html->script('jquery-2.0.3.min');
        echo $this->Html->script('jquery-ui-1.10.3.min');
        echo $this->Html->script('admin');

        echo $this->fetch('meta');
        echo $this->fetch('css');
        echo $this->fetch('script');
    ?>
</head>
<body>
    <section id="left">
        <p><?= $this->Html->image('koncar_auto_admin.png?h=100', array(
            'class' => 'logo',
            'url'   => '/admin'
        )) ?></p>
        <p>
            <?= $this->Html->link('Sajt', '/') ?> |
            <?= $this->Html->link('Izlaz', '/admin/logout') ?>
        </p>
        
        <?php
            $menu = array(
                'Podešavanja'    => '/admin',
                'Početna strana' => '/admin_home',
                'Stranice'       => '/admin_pages',
                'Cene'           => '/admin_cene'
            );
            $url = $this->params->params
        ?>
        
        <menu>
            <? foreach ($menu as $label=>$link): ?>
            <? $url2 = Router::parse($link) ?>
            
            <li>
                <? if ($url2['controller'] == $url['controller']): ?>
                    <strong><?= $label ?></strong>
                <? else: ?>
                    <?= $this->Html->link($label, $link) ?>
                <? endif ?>
            </li>
            <? endforeach ?>
        </menu>
    </section>
    
    <section id="content">
        <?php echo $this->Session->flash('flash', array('element'=>'flash')); ?>

        <?php echo $this->fetch('content'); ?>
    </section>
    <?php $this->element('sql_dump'); ?>
</body>
</html>
